package java_thinking.unit_16;

import java_thinking.net.mindview.util.Generated;
import java_thinking.net.mindview.util.RandomGenerator;
import java_thinking.unit_15._15_3.Generator;

import java.util.Arrays;
import java.util.Collections;

/**
 * @Desc:   创建一个Integer数组，用随机的int数值填充它，在使用Comparator将其进行反向排序
 * @author: cww
 * @DateTime: 2019/4/10 20:16
 */

public class E23_ArraySort2 {
    public static void main(String[] args) {
        Generator<Integer> gen = new RandomGenerator.Integer(1000);
        Integer[] i = Generated.array(new Integer[25],gen);
        System.out.println("before sort : "+ Arrays.toString(i));
        Arrays.sort(i, Collections.reverseOrder());
        System.out.println("After sort : "+Arrays.toString(i));

    }
}
